ci: make docs check always run so it can gate merges#12
Merged
Conversation
Previously the docs job's pull_request trigger was path-filtered to docsite/**, which means it can never be a branch-protection required check without permanently blocking merges on PRs that don't touch docsite (a required check that never runs never reports success). Removes the path filter from the pull_request trigger, renames the job's check to "docs" for clarity, and adds an in-job diff check that skips the real build steps (fast no-op success) when the PR doesn't touch docsite/ or this workflow file. The job always completes and reports a real status either way, which is what branch protection needs to require it safely. Push trigger keeps its path filter since it's unrelated to merge gating. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks
ncipollina
added a commit
to LayeredCraft/.github
that referenced
this pull request
Jul 21, 2026
* feat: require docs check on sharp-mud, via per-repo override sharp-mud's docs workflow now always runs on PRs (skipping the real build fast when irrelevant) specifically so it's safe to require — see LayeredCraft/sharp-mud#12. Org-default contexts only list "build / build", so this repo needs its own override to add "docs" without affecting every other repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: shrink sharp-mud override to just the added context safe-settings merges required_status_checks.contexts across org/repo levels by default (org-level contexts fold into repo-level, not replaced), so repeating build / build and the whole rest of the protection block here was redundant duplication of settings.yml — only the net-new "docs" context belongs in this file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
paths:filter from the docs workflow'spull_requesttrigger — a path-filtered check can never safely become a required branch-protection check, since it never posts a status (and thus blocks merge forever) on PRs that don't touch the filtered pathsdocs(was the bare, easily-confused-with-other-workflowsbuild)docsite/or this workflow file — so unrelated PRs still get a fast green check instead of a full docs rebuildPaired with LayeredCraft/.github#3 (adds
docsto this repo's required status checks). Both need to merge for the gate to take effect — this PR alone is a no-op for branch protection.Test plan
docscheck appears and passes (fast, no docsite changes)docsactually runs the full builddocson new PRs🤖 Generated with Claude Code